CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

## project settings
PROJECT(QTweetLib)
SET( QTWEETLIB_MAJOR_VERSION 1 )
SET( QTWEETLIB_MINOR_VERSION 0 )
SET( QTWEETLIB_PATCH_VERSION 0 )

SET( QTWEETLIB_VERSION ${QTWEETLIB_MAJOR_VERSION}.${QTWEETLIB_MINOR_VERSION}.${QTWEETLIB_PATCH_VERSION} )
SET( QTWEETLIB_SONAME ${QTWEETLIB_MAJOR_VERSION}.${QTWEETLIB_MINOR_VERSION} )

MESSAGE(STATUS "Building QTweetLib " ${QTWEETLIB_VERSION} )

# cmake modules
SET( CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_SOURCE_DIR}/cmake/modules" )

## required deps
# qt4
FIND_PACKAGE( Qt4 COMPONENTS QtCore QtNetwork QtGui REQUIRED )
INCLUDE( ${QT_USE_FILE} )
# qjson
FIND_PACKAGE( QJSON REQUIRED )

# definitions
ADD_DEFINITIONS( ${QT_DEFINITIONS} )
ADD_DEFINITIONS( -DQT_SHARED )
ADD_DEFINITIONS( -DQTWEETLIB_MAKEDLL )

# build actual source dir
ADD_SUBDIRECTORY( src )
